<template>
	<view class="shareCustomersBox">
		<view class="shareCustomersList" v-for="(ele,ind) in shareCustomersList" v-if="shareCustomersList.length>0 && isShow==true" :key="ind">
			<view>{{ele.REAL_NAME}}</view>
			<view style="font-size:30rpx;" @click="gotoRouter(ind)">
				<!-- {{ele.time}} -->
				<text class='iconfont icon-xiangyou' style="margin-left:5rpx;"></text>
			</view>
		</view>
		<view v-if="shareCustomersList.length == 0 && isShow==true">
			<emptyPage title="暂无注册顾客～"></emptyPage>
		</view>
	</view>
</template>

<script>
	import {
		getRegistMembersData
	} from '@/api/directSelling.js'
	import emptyPage from '@/components/emptyPage.vue'
	export default {
		components: {
			emptyPage
		},
		data() {
			return {
				isShow:false,
				shareCustomersList: []
			}
		},
		created() {
			uni.showLoading({
				title: '查询中',
				mask: true
			});
			this.getRegistMembersData();
		},
		methods: {
			getRegistMembersData(){
				getRegistMembersData({
					pageSize:30,
					pageNumber:1
				}
				).then((res)=>{
					let data=res.data.rows;
					this.shareCustomersList=data;
					this.isShow=true;
					uni.hideLoading();
				}).catch((err)=>{
					
				})
			},
			gotoRouter(ind) {
				uni.navigateTo({
					url: "/pages/directSellingPage/shareCustomers/registMemberDetails?ind="+ind
				});
			}
		}
	}
</script>

<style lang="scss">
	body,
	page {
		background: #fff;
		padding: 20rpx 30rpx;
		box-sizing: border-box;
	}

	.shareCustomersList {
		width: 100%;
		height: auto;
		padding: 0rpx 30rpx;
		box-sizing: border-box;
		box-shadow: 0px 0px 10px #e6e6e6;
		border-radius: 8rpx;
		margin-bottom: 25rpx;
		display: flex;
		line-height: 80rpx;
		justify-content: space-between;

		>view {}
	}
</style>
